#ifndef _UNITMANAGER_H_
#define _UNITMANAGER_H_

#include <list>

#include "Unit.h"
#include "Script.h"

class UnitManager
{
   private:
      list<Unit*> mUnits;
      UnitManager();
      UnitManager& operator= (const UnitManager& x);

      Dac mDacUnit;

   public:
      static UnitManager& getInstance()
      {
         static UnitManager unitManager;
         return unitManager;
      }

      void registerUnit(Unit *unit);
      Unit* getUnitByName(string name);
      int unitCount();
      list<Unit*> allUnits();

      Unit* getDac();
};

#endif
